package net.dipper.tankwar.game.ui;

import java.awt.Dimension;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JPanel;

public class MenuPane extends JPanel {

	/**
	 * 
	 */
	public static final int WELCOMEPANE_W = 600;
	public static final int WELCOMEPANE_H = 600;
	public static final int SELECTIONPANE_W = 400;
	public static final int SELECTIONPANE_H = 600;
	public static final int DEFAULT_W = 1024;
	public static final int DEFAULT_H = 600;
	
	private static final long serialVersionUID = 1L;

	private WelcomePane welcomePane;
	private SelectionPane selectionPane;
	
	public MenuPane(MainWindow parent){
		this.welcomePane = new WelcomePane(100, true);
		this.selectionPane = new SelectionPane(parent);
		
		this.welcomePane.setPreferredSize(new Dimension(WELCOMEPANE_W, WELCOMEPANE_H));
		this.selectionPane.setPreferredSize(new Dimension(SELECTIONPANE_W, SELECTIONPANE_H));
		
		setPreferredSize(new Dimension(DEFAULT_W, DEFAULT_H));
		setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
		add(welcomePane);
		add(Box.createRigidArea(new Dimension(10, 10)));
		add(selectionPane);
		
		this.welcomePane.start();
	}
}
